#ifndef UIWIN_BASE_APP_H_
#define UIWIN_BASE_APP_H_

namespace uiwin
{
	class DLL_API App
	{
	public:
		
		static void Create(HINSTANCE instance, HINSTANCE , LPSTR lpCmdLine, int nShowCmd);
		static void Delete();
		static App* app() { return app_; }

		static HINSTANCE instance() { return app_ ? app_->instance_ : NULL; }

		BOOL TranslateMessage(const MSG *lpMsg);

		void MessageLoop();

	private:
		App(HINSTANCE instance, LPSTR lpCmdLine, int nShowCmd);

		HINSTANCE instance_;

		static App* app_;
	};
}

#endif	// UIWIN_BASE_APP_H_